package com.cy.stone.common.base;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;

/**
 * 分页查询公共参数
 * @author Wings
 * @since 2023-12-18
 */
@Data
@Valid
public class BasePage {

    @Schema(description = "页数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "页数不能为空")
    private long pageSize;

    @Schema(description = "页码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "页码不能为空")
    private long pageNum;

    @Schema(description = "正序字段", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String[] asc;

    @Schema(description = "倒序字段", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String[] desc;
}
